package action;

import groupby.manage.GroupbyManage;
import groupby.util.Pages;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

import com.opensymphony.xwork2.ActionSupport;

public class TestAction extends ActionSupport {

	private String title=null;
	
	private GroupbyManage groupbyManage=null;
	private int currentPage;
	private int rows;
    private JSONObject result;

    // ajax请求参数赋值
    public void setTitle(String title) {
        this.title = title;
    }

    // ajax返回结果
    public JSONObject getResult() {
        return result;
    }
    public String execute() {
    	return "success";
    }

    public String getData() {
    	System.out.println("title:"+title+";currentPage:"+currentPage+";rows:"+rows);

    	Pages pages=new Pages();
    	      pages.setCurrentPage(currentPage);
    	      pages.setPageSize(rows);
    	      //result=groupbyManage.getTodayList("仅售5元", pages);
    	      System.out.println(result.toString());
        return "success";
    }

	public int getCurrentPage() {
		return currentPage;
	}

	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
	}

	public int getRows() {
		return rows;
	}

	public void setRows(int rows) {
		this.rows = rows;
	}

	public String getTitle() {
		return title;
	}

	

	public GroupbyManage getGroupbyManage() {
		return groupbyManage;
	}

	public void setGroupbyManage(GroupbyManage groupbyManage) {
		this.groupbyManage = groupbyManage;
	}


}
